package ch0300;

public class Triangle extends Shape{
    private int a,b;
	

	public Triangle(int a, int b) {
		super();
		this.a = a;
		this.b = b;
	}


	@Override
	float area() {
		// TODO 自动生成的方法存根
		float area=(float)0.5*a*b;
		System.out.println("底为"+a+",高为"+b+"的三角形面积是"+area);
		return area;
	}

}
